package com.rpj.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rpj.dao.UserDao;
import com.rpj.entity.RolesEntity;
import com.rpj.entity.UserDto;
import com.rpj.entity.UserEntity;
import com.rpj.service.UserService;
@Service
public class UserImpl implements UserService{
@Autowired
private UserDao userdao;
	public UserEntity login(String name, String pwd) {
		// TODO Auto-generated method stub
		return userdao.login(name, pwd);
	}
	public List<RolesEntity> selByUserName(String name) {
		// TODO Auto-generated method stub
		return userdao.selByUserName(name);
	}
	
	@Override
	public int countUser(UserDto Dto) {
		// TODO Auto-generated method stub
		return userdao.countUser(Dto);
	}
	@Override
	public List<UserEntity> findUser(UserDto Dto) {
		// TODO Auto-generated method stub
		return userdao.findUser(Dto);
	}
	@Override
	public int saveUser(String name, String pwd, String email, String phone) {
		// TODO Auto-generated method stub
		return userdao.saveUser(name, pwd, email, phone);
	}
	@Override
	public int updateUser(UserEntity userEntity) {
		// TODO Auto-generated method stub
		return userdao.updateUser(userEntity);
	}
	@Override
	public int delUser(UserEntity userEntity) {
		// TODO Auto-generated method stub
		return userdao.delUser(userEntity);
	}
	@Override
	public int resetUser(UserEntity userEntity) {
		// TODO Auto-generated method stub
		return userdao.resetUser(userEntity);
	}
	@Override
	public int lockUser(UserEntity userEntity) {
		// TODO Auto-generated method stub
		return userdao.lockUser(userEntity);
	}
	@Override
	public int nolockUser(UserEntity userEntity) {
		// TODO Auto-generated method stub
		return userdao.nolockUser(userEntity);
	}
	

}
